//
//  GiftModel.swift
//  WalkNovel
//
//  Created by Kevin on 2023/9/18.
//

import UIKit
import HandyJSON

struct GiftModel: HandyJSON {
    var giftNo: String? //礼物ID
    var name: String? //礼物名称
    var cover: String? //礼物图片地址
    var gold: Int = 0 //礼物价格
    var isSelected: Bool = false
    var num: Int = 0 //礼物数量

    var uname: String? // 用户名
    var avatar: String? // 用户头像
    var time: String? // 时间戳秒

    var bookName: String? // 书名
    var cost: Int = 0 // 花费
}

struct VersionModel: HandyJSON {
    var versions: String?
    var title: String?
    var desc: String?
}

struct TaskModel: HandyJSON {
    var taskType: Int = 0 // 1: 每日任务， 2：用户任务
    var status: Int = 0  // 1: 未完成，2：已完成，3：已领取
    var taskId: Int = 0  // 任务id
    var taskName: String? // 任务名称
    var desc: String? // 任务描述
    var jumpUrl: String? // 跳转类型
    var gold: Int = 0 // 任务价格
    
    var dailyType: Int = 0  // 每日任务类型 1-每日首冲 2-每日解锁章节 3-每日送礼
    var accrueType: Int = 0 // 用户任务 1-累计消耗金币 2-累计阅读时间 3-完善用户信息
    var activityType: Int = 0 // 活动任务 1-阅读任务 2-解锁优惠充值
    var accrueNum: Int = 0 // 任务价格
    var cost: Int = 0 // 用户礼物花费金币 || 观看时长
    
    var chapter: Int = 0 // 总共阅读章节数
    
    var old_gold: Int = 0
    var disGold: Double = 0.00
    var price: Double = 0.00
    var productName: String?
    var productId: String?
    var productIds: String?

    var name: String?
    var author: String?
    var cover: String?
    var bookId: String?
    var children: [TaskModel]?
}

struct MusicModel: HandyJSON {
    var name: String?
    var url: String?
    var cover: String?
    var bookId: String?
    var musicId: String?
}

struct InviteModel: HandyJSON {
    var code: String?
    var count: Int = 0
    var gold: Int = 0
}
